<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="步骤3：配置应用一致性备份脚本">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="vmware_gud_0015.html">
  <meta name="DC.Relation" scheme="URI" content="vmware_gud_0019.html">
  <meta name="DC.Relation" scheme="URI" content="vmware_gud_0020.html">
  <meta name="DC.Relation" scheme="URI" content="vmware_gud_0021.html">
  <meta name="DC.Relation" scheme="URI" content="vmware_gud_0022.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
  <meta name="DC.Publisher" content="20240320">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="vmware_gud_0018">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>步骤3：配置应用一致性备份脚本</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="vmware_gud_0018"></a><a name="vmware_gud_0018"></a>
  <h1 class="topictitle1">步骤3：配置应用一致性备份脚本</h1>
  <div>
   <p>当VMware虚拟机运行在非Windows OS，在执行应用一致性备份前，请在待备份的虚拟机中配置应用一致性备份前置脚本和后置脚本。如果VMware虚拟机运行在Windows OS或非应用一致性备份场景，请跳过本章节。</p>
   <p>以下以部分数据库应用运行在VMware虚拟机为例说明脚本的配置。</p>
   <div class="tablenoborder">
    <table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all">
     <caption>
      <b>表1 </b>应用一致性备份脚本
     </caption>
     <colgroup>
      <col style="width:21.23%">
      <col style="width:22.79%">
      <col style="width:30.98%">
      <col style="width:25%">
     </colgroup>
     <thead align="left">
      <tr>
       <th align="left" class="cellrowborder" valign="top" width="21.23%" id="mcps1.3.3.2.5.1.1"><p>脚本</p></th>
       <th align="left" class="cellrowborder" valign="top" width="22.79%" id="mcps1.3.3.2.5.1.2"><p>数据库类型</p></th>
       <th align="left" class="cellrowborder" valign="top" width="30.98%" id="mcps1.3.3.2.5.1.3"><p>操作</p></th>
       <th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.5.1.4"><p>作用</p></th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td class="cellrowborder" valign="top" width="21.23%" headers="mcps1.3.3.2.5.1.1 ">
        <ul>
         <li><a href="vmware_gud_0019.html#vmware_gud_0019__section1442193318556">pre-freeze-script</a></li>
         <li><a href="vmware_gud_0019.html#vmware_gud_0019__section3346141395616">post-thaw-script</a></li>
        </ul></td>
       <td class="cellrowborder" valign="top" width="22.79%" headers="mcps1.3.3.2.5.1.2 "><p>DB2数据库</p></td>
       <td class="cellrowborder" rowspan="4" valign="top" width="30.98%" headers="mcps1.3.3.2.5.1.3 ">
        <ol>
         <li>登录待执行应用一致性备份的VMware虚拟机。</li>
         <li>检查<span class="filepath">“/usr/sbin/”</span>目录下是否存在对应的脚本。
          <div class="p">
           以DB2数据库为例：
           <ul>
            <li>如果存在<span class="filepath">“/usr/sbin/pre-freeze-script”</span>和<span class="filepath">“/usr/sbin/post-thaw-script”</span>，则参考<a href="vmware_gud_0019.html">DB2数据库</a>章节检查脚本内容是否正确。</li>
            <li>如果不存在，则新建对应的脚本，并按照<a href="vmware_gud_0019.html">DB2数据库</a>章节配置脚本内容。</li>
           </ul>
          </div></li>
        </ol></td>
       <td class="cellrowborder" rowspan="4" valign="top" width="25%" headers="mcps1.3.3.2.5.1.4 "><p>系统在执行应用一致性备份，创建一致性快照前，调用pre-freeze-script脚本，静默数据库的I/O，确保数据的一致性；创建一致性快照后，调用post-thaw-script脚本解除静默状态。</p></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.1.1 ">
        <ul>
         <li><a href="vmware_gud_0020.html#vmware_gud_0020__section4543102195920">pre-freeze-script</a></li>
         <li><a href="vmware_gud_0020.html#vmware_gud_0020__section655719346595">post-thaw-script</a></li>
        </ul></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.1.2 "><p>Oracle数据库</p></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.1.1 ">
        <ul>
         <li><a href="vmware_gud_0021.html#vmware_gud_0021__section4543102195920">pre-freeze-script</a></li>
         <li><a href="vmware_gud_0021.html#vmware_gud_0021__section655719346595">post-thaw-script</a></li>
        </ul></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.1.2 "><p>Sybase数据库</p></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.1.1 ">
        <ul>
         <li><a href="vmware_gud_0022.html#vmware_gud_0022__section136297539915">pre-freeze-script</a></li>
         <li><a href="vmware_gud_0022.html#vmware_gud_0022__section136695016107">post-thaw-script</a></li>
        </ul></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.1.2 "><p>MySQL数据库</p></td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <div>
   <ul class="ullinks">
    <li class="ulchildlink"><strong><a href="vmware_gud_0019.html">DB2数据库</a></strong><br></li>
    <li class="ulchildlink"><strong><a href="vmware_gud_0020.html">Oracle数据库</a></strong><br></li>
    <li class="ulchildlink"><strong><a href="vmware_gud_0021.html">Sybase数据库</a></strong><br></li>
    <li class="ulchildlink"><strong><a href="vmware_gud_0022.html">MySQL数据库</a></strong><br></li>
   </ul>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="vmware_gud_0015.html">备份VMware虚拟机</a>
    </div>
   </div>
  </div>
 </body>
</html>